<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <base href="http://www.talentosdosul.com.br/site/" />
    <link rel="stylesheet" type="text/css" href="css/estilo.min.css" />
    <title>Not&iacute;cias :: Talentos do Sul</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script type="text/javascript" src="js/maskedfields.min.js"></script>
    <script type="text/javascript" src="js/funcoes.min.js"></script>
</head>

<body>

	<div id="wrapper">
    
    	<?php require_once("inc/header.inc.php"); ?>
        
        <div id="wrapper-content">
        
            <?php require_once("inc/menu.inc.php"); ?>
            
            <div class="blc-overflow">
            
            	<div class="fadeout">&nbsp;</div>
                <div id="container-all">
            
                    <div id="news">
                    	
                        <?php
                        
							require_once("inc/conecta.inc.php");
							
							$url = explode("/", $_GET["url"]);
							if($url[1] == "" || !is_numeric($url[1])){
								$complemento = "ORDER BY `idnoticias` DESC LIMIT 1";	
							}else{
								$complemento = "WHERE `idnoticias` = ".$url[1];	
							}
							
							$sql = mysql_query("SELECT * FROM `noticias` ".$complemento);
							$linha = mysql_fetch_array($sql);
							
							$texto = $linha['texto'];
						
						?>
                    	
                        <h4><?php echo $linha['titulo']; ?></h4>
                        <ul id="last">
                        
                        	<li><a href="javascript: void(0);" class="more" style="cursor: default;">&Uacute;ltimas not&iacute;cias</a></li>
                            
                            <?php
                            
								$sql = mysql_query("SELECT * FROM `noticias` WHERE `idnoticias` != ".$linha['idnoticias']." ORDER BY `idnoticias` DESC LIMIT 0, 5");
								while($linha = mysql_fetch_array($sql)){
								
									echo '<li><a href="noticias/'.$linha['idnoticias'].'/visualizar/'.createURL($linha['titulo']).'" title="&Uacute;ltimas not&iacute;cias: &ldquo;'.$linha['titulo'].'&rdquo;">&raquo; '.$linha['titulo'].'</a></li>';
								
								}
							
							?>
                        
                        </ul>
                        
                        <?php echo $texto; ?>
                    
                    </div>
                    
                    <p class="fade-break">&nbsp;</p>
                
                </div>
            
            </div>
        
        </div>
        
        <?php require_once("inc/footer.inc.php"); ?>
    
    </div>

</body>
</html>